<%@include file="../header.jsp"%>

<!-- end page-heading //sampai sini-->

<div class="clear"></div>
<!-- start content-outer -->
<div id="content-outer"><!-- start content -->
    <div id="content">
        <div id="page-heading">
            <h1>Ubah Kegiatan Kerjasama </h1>
        </div>
        <table id="content-table" border="0" cellpadding="0" cellspacing="0" width="100%">
            <tbody>
                <tr>
                    <th rowspan="3" class="sized"><img src="images/shared/side_shadowleft.jpg" alt="" height="300" width="20" /></th>
                    <th class="topleft"></th>
                    <td id="tbl-border-top">&nbsp;</td>
                    <th class="topright"></th>
                    <th rowspan="3" class="sized"><img src="images/shared/side_shadowright.jpg" alt="" height="300" width="20" /></th>
                </tr>
                <tr>
                    <td id="tbl-border-left"></td>
                    <td><!-- start content-table-inner -->
                        <div id="content-table-inner">
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tbody>
                                    <tr valign="top">
                                        <td><!-- start step-holder -->
                                            <script>
                                        function validateForm()
                                        {                                            
                                            
                                            var namaInstansi = true, skKerjasama= true, namaKegiatan= true, jenisInstansi= true, tahunMulai= true, tahunSelesai= true;
                                            
                                            
                                            if(document.frm.namaInstansi.value=="")
                                            {                                                
                                                document.getElementById("namaInstansi_error").innerHTML="<div class='error-left'></div><div class='error-inner'>Instansi Kerjasama Belum Terisi.</div>";
                                                namaInstansi = false;
                                            } else {
                                                document.getElementById("namaInstansi_error").innerHTML="";       
                                            }
                                            
                                            if(document.frm.skKerjasama.value=="")
                                            {
                                                document.getElementById("skKerjasama_error").innerHTML="<div class='error-left'></div><div class='error-inner'>No. SK kerjasama belum Terisi.</div>";
                                                skKerjasama= false;
                                            } else {
                                                document.getElementById("skKerjasama_error").innerHTML="";
                                            }    
                                            
                                            if(document.frm.namaKegiatan.value=="")
                                            {
                                                document.getElementById("namaKegiatan_error").innerHTML="<div class='error-left'></div><div class='error-inner'>Nama kergiatan kerjasama belum Terisi.</div>";
                                                namaKegiatan= false;
                                            } else {
                                                document.getElementById("namaKegiatan_error").innerHTML="";
                                            }
                                            
                                            if(document.frm.jenisInstansi.value=="")
                                            {
                                                document.getElementById("jenisInstansi_error").innerHTML="<div class='error-left'></div><div class='error-inner'>Jenis Isntansi Kerjasama Belum Dipilih.</div>";
                                                jenisInstansi= false;
                                            } else {
                                                document.getElementById("jenisInstansi_error").innerHTML="";
                                            }
                                            
                                            if(document.frm.tahunMulai.value=="")
                                            {
                                                document.getElementById("tahunMulai_error").innerHTML="<div class='error-left'></div><div class='error-inner'>Periode Mulai Kerjasama Belum Dipilih.</div>";
                                                tahunMulai= false;
                                            } else if(document.frm.tahunMulai.value > document.frm.tahunSelesai.value){
                                                document.getElementById("tahunMulai_error").innerHTML="<div class='error-left'></div><div class='error-inner'>Periksan kembali periode kerjasama yang dilakukan.</div>";
                                                tahunMulai= false;
                                            } else {
                                                document.getElementById("tahunMulai_error").innerHTML="";
                                            }
                                            
                                            if(document.frm.tahunSelesai.value=="")
                                            {
                                                document.getElementById("tahunSelesai_error").innerHTML="<div class='error-left'></div><div class='error-inner'>Periode Selesai Kerjasama Belum Dipilih.</div>";
                                                tahunSelesai= false;
                                            } else {
                                                document.getElementById("tahunSelesai_error").innerHTML="";
                                            }
                                            
                                            
                                            
                                            if(namaInstansi && skKerjasama && namaKegiatan && jenisInstansi && tahunMulai && tahunSelesai){
                                                return true;
                                            }else{
                                                return false;
                                            }   
        
                                        }
                                    </script>
                                            <!-- end step-holder --><!-- start id-form -->
                                            <form name="frm" action="ubahKerjaSama?idKerjaSama=${kerjasama.idKerjaSama}&&status=submit" method="POST" onsubmit="return validateForm()">
                                                <table id="id-form" border="0" cellpadding="0" cellspacing="0">
                                                    <tbody>
                                                        <tr>
                                                            <th width="130" valign="top">Nama Instansi</th>
                                                            <td width="29" valign="middle" align="center">:</td>
                                                            <td width="403"><input class="inp-form" type="text" name="namaInstansi" value="${kerjasama.namaInstansi}"/></td>
                                                            <td id="namaInstansi_error"></td>
                                                        </tr>
                                                        <tr>
                                                            <th width="130" valign="top">No. SK Kerjasama</th>
                                                            <td width="29" valign="middle" align="center">:</td>
                                                            <td width="403"><input class="inp-form" type="text" value="${kerjasama.noSkKerjaSama}" name="skKerjasama"/></td>
                                                            <td id="skKerjasama_error"></td>
                                                        </tr>
                                                        <tr>
                                                            <th valign="top">Nama Kegiatan</th>
                                                            <td width="29" valign="top" align="center">:</td>
                                                            <td><textarea rows="" cols="" class="form-textarea" name="namaKegiatan">${kerjasama.namaKegiatan}</textarea></td>
                                                            <td id="namaKegiatan_error"></td>
                                                        </tr>
                                                        <tr>
                                                            <th valign="top">Jenis Instansi</th>
                                                            <td width="29" valign="middle" align="center">:</td>
                                                            <td>
                                                                <select name="jenisInstansi" class="styledselect_form_1">
                                                                    <option value="0">-- Pilih Jenis Instansi --</option>
                                                                    <c:forEach items="${jenisInstansis}" var="jenisInstansi" >
                                                                        <option value="${jenisInstansi.idJenisInstansi}"
                                                                                <c:if test="${(jenisInstansi.idJenisInstansi == kerjasama.idJenisInstansi)}">
                                                                                    selected="selected"
                                                                                </c:if>
                                                                                >${jenisInstansi.jenisInstansi}</option>
                                                                    </c:forEach> 
                                                                </select>
                                                            </td>
                                                            <td id="jenisInstansi_error"></td>
                                                        </tr>
                                                        <tr>
                                                            <th valign="top">Tahun Mulai</th>
                                                            <td width="29" valign="middle" align="center">:</td>
                                                            <td>
                                                                <select name="tahunMulai" class="styledselect_form_1">
                                                                    <option value="0">-- Pilih Tahun Mulai --</option>
                                                                    <option value="2006"
                                                                            <c:if test="${(kerjasama.tahunMulai=='2006')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2006</option>
                                                                    <option value="2007"
                                                                            <c:if test="${(kerjasama.tahunMulai=='2007')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2007</option>
                                                                    <option value="2008"
                                                                            <c:if test="${(kerjasama.tahunMulai=='2008')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2008</option>
                                                                    <option value="2009"
                                                                            <c:if test="${(kerjasama.tahunMulai=='2009')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2009</option>
                                                                    <option value="2010"
                                                                            <c:if test="${(kerjasama.tahunMulai=='2010')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2010</option>
                                                                    <option value="2011"
                                                                            <c:if test="${(kerjasama.tahunMulai=='2011')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2011</option>
                                                                    <option value="2012"
                                                                            <c:if test="${(kerjasama.tahunMulai=='2012')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2012</option>
                                                                    <option value="2013"
                                                                            <c:if test="${(kerjasama.tahunMulai=='2013')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2013</option>
                                                                </select>
                                                            </td>
                                                            <td id="tahunMulai_error"></td>
                                                        </tr>
                                                        <tr>
                                                            <th valign="top">Tahun Selesai</th>
                                                            <td width="29" valign="middle" align="center">:</td>
                                                            <td><select name="tahunSelesai" class="styledselect_form_1">
                                                                    <option value="0">-- Pilih Tahun Selesai --</option>
                                                                    <option value="2006"
                                                                            <c:if test="${(kerjasama.tahunSelesai=='2006')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2006</option>
                                                                    <option value="2007"
                                                                            <c:if test="${(kerjasama.tahunSelesai=='2007')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2007</option>
                                                                    <option value="2008"
                                                                            <c:if test="${(kerjasama.tahunSelesai=='2008')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2008</option>
                                                                    <option value="2009"
                                                                            <c:if test="${(kerjasama.tahunSelesai=='2009')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2009</option>
                                                                    <option value="2010"
                                                                            <c:if test="${(kerjasama.tahunSelesai=='2010')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2010</option>
                                                                    <option value="2011"
                                                                            <c:if test="${(kerjasama.tahunSelesai=='2011')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2011</option>
                                                                    <option value="2012"
                                                                            <c:if test="${(kerjasama.tahunSelesai=='2012')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2012</option>
                                                                    <option value="2013"
                                                                            <c:if test="${(kerjasama.tahunSelesai=='2013')}">                
                                                                                selected="selected"
                                                                            </c:if>
                                                                            >2013</option>
                                                                </select></td>
                                                            <td id="tahunSelesai_error"></td>
                                                        </tr>
                                                        <tr>
                                                            <th valign="top">Manfaat Kerjasama</th>
                                                            <td valign="top" align="center">:</td>
                                                            <td><textarea rows="" cols="" class="form-textarea" name="manfaatKerjasama">${kerjasama.manfaatKerjaSama}</textarea></td>
                                                            <td id="manfaatKerjasama_error"></td>
                                                        </tr>
                                                        <tr>
                                                            <th>&nbsp;</th>
                                                            <td valign="top">&nbsp;</td>
                                                            <td valign="top"> 
                                                                <input type="submit" value="" class="form-simpan" />
                                                                <input type="reset" value="" class="form-batal"  />
                                                            <td></td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </form>
                                            <!-- end id-form --> </td>
                                        <td><!-- start related-activities -->
                                            <div id="related-activities"><!-- start related-act-top -->
                                                <div id="related-act-top"> <img src="../images/forms/header_related_act.gif" alt="" height="43" width="271" /> </div>
                                                <!-- end related-act-top --><!-- start related-act-bottom -->
                                                <!--  start related-act-bottom -->
                                                <div id="related-act-bottom">

                                                    <!--  start related-act-inner -->
                                                    <div id="related-act-inner">

                                                        <!--<div class="left"><a href=""><img src="images/forms/icon_plus.gif" width="21" height="21" alt="" /></a></div>-->
                                                        <div class="right">
                                                            <h5>Pengisian Data </h5>
                                                            Silakan isi data dengan teliti dan benar. Kolom yang bertanda * wajib diisi.
                                                            <!--<ul class="greyarrow">
                                                                <li><a href="">Click here to visit</a></li> 
                                                                <li><a href="">Click here to visit</a> </li>
                                                            </ul>-->
                                                        </div>

                                                        <div class="clear"></div>
                                                        <div class="lines-dotted-short"></div>

                                                        <div class="clear"></div>
                                                    </div>
                                                    <!-- end related-act-inner -->
                                                    <div class="clear"></div>

                                                </div></td>
                                    </tr>
                                    <tr>
                                        <td><img src="images/shared/blank.gif" alt="blank" height="1" width="695" /></td>
                                        <td></td>
                                    </tr>
                                </tbody>
                            </table>
                            <div class="clear"></div>
                        </div>
                        <!-- end content-table-inner -->
                    </td>
                    <td id="tbl-border-right"></td>
                </tr>
                <tr>
                    <th class="sized bottomleft"></th>
                    <td id="tbl-border-bottom">&nbsp;</td>
                    <th class="sized bottomright"></th>
                </tr>
            </tbody>
        </table>
        <div class="clear">&nbsp;</div>
    </div>
    <!-- end content -->
    <!--  end content-outer -->



    <div class="clear">&nbsp;</div>

    <%@include file="../footer.jsp"%>